package com.hshx.client;

import com.hshx.pojo.Attendance;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "gateway",
                path = "/workService",
                contextId = "AttendanceClient")
public interface AttendanceClient {
    @RequestMapping("/addAttendance")
    boolean addAttendance(@SpringQueryMap Attendance attendance);

    @RequestMapping("/removeAttendance")
    boolean removeAttendance(@RequestParam(name = "attendanceId") int attendanceId);

    @RequestMapping("/updateAttendance")
    boolean updateAttendance(@SpringQueryMap Attendance attendance);

    @RequestMapping("/getAllAttendance")
    List<Attendance> getAllAttendance();

    @RequestMapping("/getAttendanceOne")
    Attendance getAttendanceOne(@RequestParam(name = "attendanceId") int attendanceId);
}
